/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ch.uzh.ifi.seal.ssqa.model.impl;

import ch.uzh.ifi.seal.ssqa.model.ClassIndicator;
import ch.uzh.ifi.seal.ssqa.model.ModelPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Class Indicator</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link ch.uzh.ifi.seal.ssqa.model.impl.ClassIndicatorImpl#getSTNOC <em>STNOC</em>}</li>
 *   <li>{@link ch.uzh.ifi.seal.ssqa.model.impl.ClassIndicatorImpl#getSTLCM <em>STLCM</em>}</li>
 *   <li>{@link ch.uzh.ifi.seal.ssqa.model.impl.ClassIndicatorImpl#getSTWMC <em>STWMC</em>}</li>
 *   <li>{@link ch.uzh.ifi.seal.ssqa.model.impl.ClassIndicatorImpl#getSTRFC <em>STRFC</em>}</li>
 *   <li>{@link ch.uzh.ifi.seal.ssqa.model.impl.ClassIndicatorImpl#getSTCBO <em>STCBO</em>}</li>
 *   <li>{@link ch.uzh.ifi.seal.ssqa.model.impl.ClassIndicatorImpl#getClass_ <em>Class</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ClassIndicatorImpl extends EObjectImpl implements ClassIndicator {
	/**
	 * The default value of the '{@link #getSTNOC() <em>STNOC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTNOC()
	 * @generated
	 * @ordered
	 */
	protected static final int STNOC_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSTNOC() <em>STNOC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTNOC()
	 * @generated
	 * @ordered
	 */
	protected int stnoc = STNOC_EDEFAULT;

	/**
	 * The default value of the '{@link #getSTLCM() <em>STLCM</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTLCM()
	 * @generated
	 * @ordered
	 */
	protected static final int STLCM_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSTLCM() <em>STLCM</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTLCM()
	 * @generated
	 * @ordered
	 */
	protected int stlcm = STLCM_EDEFAULT;

	/**
	 * The default value of the '{@link #getSTWMC() <em>STWMC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTWMC()
	 * @generated
	 * @ordered
	 */
	protected static final int STWMC_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSTWMC() <em>STWMC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTWMC()
	 * @generated
	 * @ordered
	 */
	protected int stwmc = STWMC_EDEFAULT;

	/**
	 * The default value of the '{@link #getSTRFC() <em>STRFC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTRFC()
	 * @generated
	 * @ordered
	 */
	protected static final int STRFC_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSTRFC() <em>STRFC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTRFC()
	 * @generated
	 * @ordered
	 */
	protected int strfc = STRFC_EDEFAULT;

	/**
	 * The default value of the '{@link #getSTCBO() <em>STCBO</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTCBO()
	 * @generated
	 * @ordered
	 */
	protected static final int STCBO_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSTCBO() <em>STCBO</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSTCBO()
	 * @generated
	 * @ordered
	 */
	protected int stcbo = STCBO_EDEFAULT;

	/**
	 * The default value of the '{@link #getClass_() <em>Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getClass_()
	 * @generated
	 * @ordered
	 */
	protected static final String CLASS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getClass_() <em>Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getClass_()
	 * @generated
	 * @ordered
	 */
	protected String class_ = CLASS_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ClassIndicatorImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ModelPackage.Literals.CLASS_INDICATOR;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSTNOC() {
		return stnoc;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSTNOC(int newSTNOC) {
		int oldSTNOC = stnoc;
		stnoc = newSTNOC;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.CLASS_INDICATOR__STNOC, oldSTNOC, stnoc));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSTLCM() {
		return stlcm;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSTLCM(int newSTLCM) {
		int oldSTLCM = stlcm;
		stlcm = newSTLCM;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.CLASS_INDICATOR__STLCM, oldSTLCM, stlcm));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSTWMC() {
		return stwmc;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSTWMC(int newSTWMC) {
		int oldSTWMC = stwmc;
		stwmc = newSTWMC;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.CLASS_INDICATOR__STWMC, oldSTWMC, stwmc));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSTRFC() {
		return strfc;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSTRFC(int newSTRFC) {
		int oldSTRFC = strfc;
		strfc = newSTRFC;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.CLASS_INDICATOR__STRFC, oldSTRFC, strfc));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSTCBO() {
		return stcbo;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSTCBO(int newSTCBO) {
		int oldSTCBO = stcbo;
		stcbo = newSTCBO;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.CLASS_INDICATOR__STCBO, oldSTCBO, stcbo));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getClass_() {
		return class_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setClass(String newClass) {
		String oldClass = class_;
		class_ = newClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.CLASS_INDICATOR__CLASS, oldClass, class_));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ModelPackage.CLASS_INDICATOR__STNOC:
				return getSTNOC();
			case ModelPackage.CLASS_INDICATOR__STLCM:
				return getSTLCM();
			case ModelPackage.CLASS_INDICATOR__STWMC:
				return getSTWMC();
			case ModelPackage.CLASS_INDICATOR__STRFC:
				return getSTRFC();
			case ModelPackage.CLASS_INDICATOR__STCBO:
				return getSTCBO();
			case ModelPackage.CLASS_INDICATOR__CLASS:
				return getClass_();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ModelPackage.CLASS_INDICATOR__STNOC:
				setSTNOC((Integer)newValue);
				return;
			case ModelPackage.CLASS_INDICATOR__STLCM:
				setSTLCM((Integer)newValue);
				return;
			case ModelPackage.CLASS_INDICATOR__STWMC:
				setSTWMC((Integer)newValue);
				return;
			case ModelPackage.CLASS_INDICATOR__STRFC:
				setSTRFC((Integer)newValue);
				return;
			case ModelPackage.CLASS_INDICATOR__STCBO:
				setSTCBO((Integer)newValue);
				return;
			case ModelPackage.CLASS_INDICATOR__CLASS:
				setClass((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ModelPackage.CLASS_INDICATOR__STNOC:
				setSTNOC(STNOC_EDEFAULT);
				return;
			case ModelPackage.CLASS_INDICATOR__STLCM:
				setSTLCM(STLCM_EDEFAULT);
				return;
			case ModelPackage.CLASS_INDICATOR__STWMC:
				setSTWMC(STWMC_EDEFAULT);
				return;
			case ModelPackage.CLASS_INDICATOR__STRFC:
				setSTRFC(STRFC_EDEFAULT);
				return;
			case ModelPackage.CLASS_INDICATOR__STCBO:
				setSTCBO(STCBO_EDEFAULT);
				return;
			case ModelPackage.CLASS_INDICATOR__CLASS:
				setClass(CLASS_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ModelPackage.CLASS_INDICATOR__STNOC:
				return stnoc != STNOC_EDEFAULT;
			case ModelPackage.CLASS_INDICATOR__STLCM:
				return stlcm != STLCM_EDEFAULT;
			case ModelPackage.CLASS_INDICATOR__STWMC:
				return stwmc != STWMC_EDEFAULT;
			case ModelPackage.CLASS_INDICATOR__STRFC:
				return strfc != STRFC_EDEFAULT;
			case ModelPackage.CLASS_INDICATOR__STCBO:
				return stcbo != STCBO_EDEFAULT;
			case ModelPackage.CLASS_INDICATOR__CLASS:
				return CLASS_EDEFAULT == null ? class_ != null : !CLASS_EDEFAULT.equals(class_);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (STNOC: ");
		result.append(stnoc);
		result.append(", STLCM: ");
		result.append(stlcm);
		result.append(", STWMC: ");
		result.append(stwmc);
		result.append(", STRFC: ");
		result.append(strfc);
		result.append(", STCBO: ");
		result.append(stcbo);
		result.append(", class: ");
		result.append(class_);
		result.append(')');
		return result.toString();
	}

} //ClassIndicatorImpl
